package com.tourismhengyang.beans;

public class PlaneTicket {
	private int pid;
	private String pname;
	private String pdate; 
	private String pgo;
	private String pto;
	private String ctime;
	private String etime;
	private double pprice;
	private String runtime;
	
	@Override
	public String toString() {
		return "PlaneTicket [pid=" + pid + ", pname=" + pname + ", pdate=" + pdate + ", pgo=" + pgo + ", pto=" + pto
				+ ", ctime=" + ctime + ", etime=" + etime + ", pprice=" + pprice + ", runtime=" + runtime + "]";
	}

	public int getPid() {
		return pid;
	}

	public void setPid(int pid) {
		this.pid = pid;
	}

	public String getPname() {
		return pname;
	}

	public void setPname(String pname) {
		this.pname = pname;
	}

	public String getPdate() {
		return pdate;
	}

	public void setPdate(String pdate) {
		this.pdate = pdate;
	}

	public String getPgo() {
		return pgo;
	}

	public void setPgo(String pgo) {
		this.pgo = pgo;
	}

	public String getPto() {
		return pto;
	}

	public void setPto(String pto) {
		this.pto = pto;
	}

	public String getCtime() {
		return ctime;
	}

	public void setCtime(String ctime) {
		this.ctime = ctime;
	}

	public String getEtime() {
		return etime;
	}

	public void setEtime(String etime) {
		this.etime = etime;
	}

	public double getPprice() {
		return pprice;
	}

	public void setPprice(double pprice) {
		this.pprice = pprice;
	}

	public String getRuntime() {
		return runtime;
	}

	public void setRuntime(String runtime) {
		this.runtime = runtime;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((ctime == null) ? 0 : ctime.hashCode());
		result = prime * result + ((etime == null) ? 0 : etime.hashCode());
		result = prime * result + ((pdate == null) ? 0 : pdate.hashCode());
		result = prime * result + ((pgo == null) ? 0 : pgo.hashCode());
		result = prime * result + pid;
		result = prime * result + ((pname == null) ? 0 : pname.hashCode());
		long temp;
		temp = Double.doubleToLongBits(pprice);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + ((pto == null) ? 0 : pto.hashCode());
		result = prime * result + ((runtime == null) ? 0 : runtime.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		PlaneTicket other = (PlaneTicket) obj;
		if (ctime == null) {
			if (other.ctime != null)
				return false;
		} else if (!ctime.equals(other.ctime))
			return false;
		if (etime == null) {
			if (other.etime != null)
				return false;
		} else if (!etime.equals(other.etime))
			return false;
		if (pdate == null) {
			if (other.pdate != null)
				return false;
		} else if (!pdate.equals(other.pdate))
			return false;
		if (pgo == null) {
			if (other.pgo != null)
				return false;
		} else if (!pgo.equals(other.pgo))
			return false;
		if (pid != other.pid)
			return false;
		if (pname == null) {
			if (other.pname != null)
				return false;
		} else if (!pname.equals(other.pname))
			return false;
		if (Double.doubleToLongBits(pprice) != Double.doubleToLongBits(other.pprice))
			return false;
		if (pto == null) {
			if (other.pto != null)
				return false;
		} else if (!pto.equals(other.pto))
			return false;
		if (runtime == null) {
			if (other.runtime != null)
				return false;
		} else if (!runtime.equals(other.runtime))
			return false;
		return true;
	}

	public PlaneTicket(int pid, String pname, String pdate, String pgo, String pto, String ctime, String etime,
			double pprice, String runtime) {
		super();
		this.pid = pid;
		this.pname = pname;
		this.pdate = pdate;
		this.pgo = pgo;
		this.pto = pto;
		this.ctime = ctime;
		this.etime = etime;
		this.pprice = pprice;
		this.runtime = runtime;
	}

	public PlaneTicket() {
		super();
		// TODO Auto-generated constructor stub
	}
}
